<template>
	<view>
		<u-popup :show="true" @close="Close">
			<view class="showPay">
				<text class="Title">请输入交易密码</text>
				<view class="CodeIn">
					<u-code-input focus dot v-model="payPassword" :maxlength="6" @change="codeChange"
						@finish="finish"></u-code-input>
				</view>
				<view class="configBtn " :class="{'bgcolor':Finish}" @click="configPay">确定</view>
				<text class="color text-center size30 m-top20" @click="call()">忘记密码</text>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {

		data() {
			return {

				payPassword: '',
				Finish: false,
			}
		},
		methods: {
			finish(e) {
				this.Finish = true
			},
			codeChange(e) {
				if (e.length < 6) this.Finish = false
			},
			Close() {
				this.$emit('Close')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.showPay {
		width: 100%;
		padding: 20rpx 20rpx 150rpx 20rpx;
		display: flex;
		flex-direction: column;

		.Title {
			color: #000;
			font-size: 30rpx;
			text-align: center;
		}

		.CodeIn {
			width: 100%;
			display: flex;
			justify-content: center;
			margin-top: 60rpx;
		}

		.configBtn {
			width: 400rpx;
			height: 80rpx;
			background-color: #999999;
			color: #fff;
			font-size: 30rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			border-radius: 40rpx;
			margin: 100rpx auto 0;
		}
	}
</style>